home *** CD-ROM | disk | FTP | other *** search
- Path: newshost.lanl.gov!tanmoy
- From: tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya)
- Newsgroups: comp.lang.c
- Subject: Re: ANSI C eoln
- Date: 05 Feb 1996 05:57:55 GMT
- Organization: Los Alamos National Laboratory
- Message-ID: <TANMOY.96Feb4225755@qcd.lanl.gov>
- References: <4f3aq0$b9k@nic.umass.edu>
- NNTP-Posting-Host: qcd.lanl.gov
- Mime-Version: 1.0
- Content-Type: text
- In-reply-to: peerbhai@twain.oit.umass.edu's message of 4 Feb 1996 22:09:04 GMT
-
- In article <4f3aq0$b9k@nic.umass.edu> peerbhai@twain.oit.umass.edu
- (Imran Peerbhai) writes:
- What is the ANSI C keyword for eoln?
-
- None :-) When you read a text file, the end of line is read as the
- character '\n', however it may be represented in the file. Similarly
- when you write a text file, writing '\n' terminates the current line
- (and _may_ eat up some immediately previous blanks). While writing text
- files, one should write a '\n' at the end.
-
- While reading an unknown text files, you cannot assume that the last
- character you read before the file ends will be a '\n'. (Sorry,
- different languages are different ... just have to get used to it :-)
-
- For binary files, end of line does not make sense (and it did not make
- sense in Pascal non-text files either.)
-
- Cheers
- Tanmoy
- --
- tanmoy@qcd.lanl.gov(128.165.23.46) DECNET: BETA::"tanmoy@lanl.gov"(1.218=1242)
- Tanmoy Bhattacharya O:T-8(MS B285)LANL,NM87545 H:#9,3000,Trinity Drive,NM87544
- Others see <gopher://yaleinfo.yale.edu:7700/00/Internet-People/internet-mail>,
- <http://alpha.acast.nova.edu/cgi-bin/inmgq.pl>or<ftp://csd4.csd.uwm.edu/pub/
- internetwork-mail-guide>. -- <http://nqcd.lanl.gov/people/tanmoy/tanmoy.html>
- fax: 1 (505) 665 3003 voice: 1 (505) 665 4733 [ Home: 1 (505) 662 5596 ]
-